<template>
  <div class="teacherVue" v-for="(item, index) in teaData" :key="index">
    <div id="right">
      <img :src="item.img" alt="" class="picture" />
    </div>
    <div id="left">
      <div>{{ item.tip }}</div>
      <li>
        <em>{{ item.title }}</em
        ><span></span><em>{{ item.personal }}</em>
      </li>
      <p>
        <em>共{{ item.assistance }}讲</em><em>{{ item.items }}人已学</em>
      </p>
    </div>
  </div>
</template>
<script>
import { onMounted, computed } from "vue";
import { useStore } from "vuex";
export default {
  setup() {
    const store = useStore();
    const teaData = computed(() => store.state.class.res);
    onMounted(() => getTeadata());
    const getTeadata = () => {
      return store.dispatch("getClassAsync");
    };
    return {
      teaData,
    };
  },
};
</script>

<style lang="less" scoped>
.teacherVue {
  display: flex;
  height: 120px;
  margin-bottom: 35px;
  margin-left: 15px;
  #left {
    width: 226px;
    height: 100%;
    text-align: left;
    margin-left: 9px;
    & > div {
      font-weight: bold;
      color: #161616;
      font-size: 15px;
      line-height: 27px;
      p {
        white-space: wrap;
        width: 100%;
        height: 35px;
        font-size: 15px;
        font-family: PingFang SC;
        font-weight: bold;
        color: #999999;
        line-height: 17px;
      }
    }

    & > li {
      width: 100%;
      height: 30px;
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: bold;
      color: #242424;
      line-height: 30px;
      display: flex;
      align-items: center;
      span {
        display: block;
        width: 3px;
        height: 3px;
        background-color: #363636;
        border-radius: 50%;
        margin: 0 8px 0 8px;
      }
      em {
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: bold;
        color: #1e1e1e;
      }
    }
    & > p {
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: bold;
      color: #999999;
      margin-bottom: 10px;
      em {
        margin-right: 15px;
        display: inline-block;
      }
    }
  }
  #right {
    .picture {
      width: 96px;
      height: 120px;
      margin: 0;
      margin-bottom: 36px;
    }
  }
}
</style>
